<ion-header-bar align-title="left" class="bar-positive">
  <div class="buttons">
    <button ng-click="$ionicGoBack()"
            class="button back-button no-animation button-icon icon buttons button-clear ion-ios-arrow-back">
    </button>
  </div>
  <h1 class="title">共{{totalanswer}}个回答</h1>
  <div class="buttons">
    <button ng-click="openModal()"
            class="button no-animation button-icon icon">回答
    </button>
  </div>
</ion-header-bar>
<ion-view>
  <ion-content style="background: #ebebeb;font-family: 'Microsoft Yahei'">
    <div class="aui-card-list">
      <div class="aui-card-list-header" style="border-bottom: 1px solid #ddd;font-size: 18px;">
        {{question.queTitle}}
      </div>
      <div class="aui-card-list-content-padded">
        {{question.queContent}}
      </div>
      <div class="aui-card-list-footer">
        <div><i ng-style="qlike" ng-hide="dzlike" class="aui-iconfont aui-icon-laud"></i>
          <i ng-show="dzlike" ng-click="qlike={'color':'#ebc951'};addlike(question.queLike,question.queId)"
             class="aui-iconfont aui-icon-laud"></i>&nbsp;{{question.queLike}}
        </div>
        <div><i class="aui-iconfont aui-icon-note"></i>&nbsp;{{question.queComment}}</div>
        <div ng-click="isgz()"><i ng-hide="gz" ng-model="gz" class="aui-iconfont aui-icon-star"></i>
          <i ng-hide="!gz" style="color:#ebc951" class="aui-iconfont aui-icon-star"></i>&nbsp;关注
        </div>
      </div>
    </div>

    <div style="margin:0px 0px 8px; box-shadow: initial;background: #fff" ng-click="ansdetail(answer, question)"
         ng-repeat="answer in answerlist">
      <div style="border: initial;padding:16px;">
        <div class="aui-list-item-user">
          <img ng-src="{{answer.avatar}}" class="aui-img-round aui-list-img-sm">&nbsp;
          {{answer.username}}
        </div>
        <div class="aui-content">
          {{answer.ansContent}}
        </div>
        <div class="aui-card-list-footer df-act-fs">
          <p style="margin:0px;">
            <small>{{answer.ansLike}}&nbsp;赞同&nbsp;·&nbsp;<a style="color:#757575" ng-click="comlist(answer.ansId)">{{answer.ansComment}}&nbsp;评论</a>&nbsp;·&nbsp;
            </small>
            <small>{{answer.ansTime | date:'yyyy-MM-dd HH:mm'}}</small>
          </p>
        </div>
      </div>
    </div>
  </ion-content>
</ion-view>
<script id="modal.html" type="text/ng-template">
  <ion-modal-view>
    <ion-header-bar class="bar bar-header bar-positive">
      <div class="buttons">
        <button ng-click="closeModal()"
                class="button back-button no-animation button-icon icon buttons button-clear ion-ios-arrow-back">
        </button>
      </div>
      <h1 class="title">回复内容</h1>
      <button class="button button-clear button-primary" ng-click="newans(question.queId)">发表</button>
    </ion-header-bar>
    <ion-content class="has-header">
      <div class="padding">
        <textarea id="answer" name="content" style="min-height: 400px;" placeholder="编写答案..."
                  ng-model="ansContent">
        </textarea>
      </div>

    </ion-content>
  </ion-modal-view>
</script>
